_init: function() {
this._items = [];
- this._focusManager = St.FocusManager.get_for_stage(global.stage);
},
addGroup: function(root, name, icon, params) {
this._items.push(item);
root.connect('destroy', Lang.bind(this, function() { this.removeGroup(root); }));
- this._focusManager.add_group(root);
+ global.focus_manager.add_group(root);
},
removeGroup: function(root) {
- this._focusManager.remove_group(root);
+ global.focus_manager.remove_group(root);
for (let i = 0; i < this._items.length; i++) {
if (this._items[i].root == root) {
this._items.splice(i, 1);
this._table.connect('style-changed', Lang.bind(this, this._styleChanged));
this.actor.set_child(this._table);
- this._buttonFocusManager = St.FocusManager.get_for_stage(global.stage);
-
// The first line should have the title, followed by the
// banner text, but ellipsized if they won't both fit. We can't
// make St.Table or St.BoxLayout do this the way we want (don't
}
if (this._buttonBox.get_n_children() > 0)
- this._buttonFocusManager.remove_group(this._buttonBox);
+ global.focus_manager.remove_group(this._buttonBox);
this._buttonBox.add(button);
- this._buttonFocusManager.add_group(this._buttonBox);
+ global.focus_manager.add_group(this._buttonBox);
button.connect('clicked', Lang.bind(this, this._onActionInvoked, id));
this.updated();
this.rightClickMenu.add(item.actor);
}
- let focusManager = St.FocusManager.get_for_stage(global.stage);
- focusManager.add_group(this.rightClickMenu);
+ global.focus_manager.add_group(this.rightClickMenu);
},
prepareNotificationStackForShowing: function() {
_onMenuKeyPress: function(actor, event) {
let symbol = event.get_key_symbol();
if (symbol == Clutter.KEY_Left || symbol == Clutter.KEY_Right) {
- let focusManager = St.FocusManager.get_for_stage(global.stage);
- let group = focusManager.get_group(this.actor);
+ let group = global.focus_manager.get_group(this.actor);
if (group) {
let direction = (symbol == Clutter.KEY_Left) ? Gtk.DirectionType.LEFT : Gtk.DirectionType.RIGHT;
group.navigate_focus(this.actor, direction, false);